home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / tutorials / tutorials.exe / plugin / tutorial / tutorial.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-30  |  1.1 KB  |  55 lines

  1. enum 
  2. {
  3.     TYPE_BLINK_LIGHT=100000,
  4.     TYPE_BOUNCE_MESH,
  5. };
  6.  
  7. class blink_light : public bsp_object
  8. {
  9. public:
  10.     blink_light() { type=TYPE_BLINK_LIGHT; };
  11.  
  12.     vector color;
  13.     float illumradius;
  14.     int blinktime;
  15.  
  16.     int step(int dt);
  17.     void draw();
  18.     int get_custom_param_desc(int i,param_desc *pd);
  19.     bsp_object *clone();
  20. };
  21.  
  22. class blink_light_desc : public class_desc
  23. {
  24. public:
  25.     void *create() { return new blink_light; };
  26.     char *get_name() { return "blink_light"; };
  27.     int get_type() { return TYPE_BLINK_LIGHT; };
  28. };
  29.  
  30. class bounce_mesh : public bsp_object
  31. {
  32. public:
  33.     bounce_mesh() { type=TYPE_BOUNCE_MESH; };
  34.  
  35.     // the obejct's mesh
  36.     mesh *objmesh;
  37.  
  38.     // no step() defined, so it uses the partcile base class step
  39.  
  40.     // this will handle drawing and collision with the object
  41.     mesh *get_mesh() { return objmesh; };
  42.  
  43.     int get_custom_param_desc(int i,param_desc *pd);
  44.     bsp_object *clone();
  45. };
  46.  
  47. class bounce_mesh_desc : public class_desc
  48. {
  49. public:
  50.     void *create() { return new bounce_mesh; };
  51.     char *get_name() { return "bounce_mesh"; };
  52.     int get_type() { return TYPE_BOUNCE_MESH; };
  53. };
  54.  
  55.